﻿/**********************************************************************
 * @file   GUIGeometryPlaneDialog.h
 * @brief  几何创建面界面类
 * @author yangjing (1195810980@qq.com)
 * @date   2025-02-20
 *********************************************************************/
#ifndef GUIGEOMETRYPLANEDIALOG_H
#define GUIGEOMETRYPLANEDIALOG_H

#include <QDialog>
#include "GUIGeometryBaseDialog.h"
QT_BEGIN_NAMESPACE
namespace Ui { class GUIGeometryPlaneDialog; }
QT_END_NAMESPACE

namespace Interface
{
    class FITKAbsGeoModelSurface;
}
namespace GUI {
    /**
    * @brief 创建几何面窗口
    * @author yangjing (1195810980@qq.com)
    * @date 2025-02-20
    */
    class GUIGeometryDialogAPI GUIGeometryPlaneDialog : public GUIGeometryBaseDialog
    {
        Q_OBJECT

    public:
        /**
        * @brief 创建的构造函数
        * @param[i]  oper           operators
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-11
        */
        GUIGeometryPlaneDialog(Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief 编辑的构造函数
         * @param[i]  obj            My Param doc
         * @param[i]  oper           My Param doc
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-11
         */
        GUIGeometryPlaneDialog(Interface::FITKAbsGeoModelSurface* obj, Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
        * @brief 析构函数
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-11
        */
        ~GUIGeometryPlaneDialog();
    private:
        /**
        * @brief init
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-12
        */
        void init() override;
        /**
        * @brief    拾取完成操作器,点击后，触发
        * @return   void
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-12
        */
        virtual void pickFinishedOper() override;

        /**
        * @brief    拾取过程中触发,用于计算拾取到多少线
        * @return   void
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-19
        */
        virtual void OnpickInProcess() override;

        /**
         * @brief 从界面获取数据，更新到数据对象中
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-12
         */
        virtual void getDataFormWidget()override;

    private slots:
        /**
        * @brief    确定按钮响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-19
        */
        void on_pushButton_OK_clicked();

        /**
        * @brief    取消按钮响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-19
        */
        void on_pushButton_Cancel_clicked();

        /**
        * @brief    选择按钮响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-02-19
        */
        void on_pushButton_Pick_clicked();
    private:
        /**
         * @brief 校验数据，如是否选择的是同一平面的线段，线段是否
         * @author yangjing (1195810980@qq.com)
         * @date 2025-02-12
         */
        bool check();


    private:
        Ui::GUIGeometryPlaneDialog *_ui = nullptr;
    };

}
#endif // GUIGEOMETRYPLANEDIALOG_H
